<?php

use yii\widgets\LinkPager;
use common\helpers\Url;
use common\helpers\Html;
use yii\widgets\ActiveForm;

$this->title = '商户银行卡管理';
$this->params['breadcrumbs'][] = ['label' => $this->title];
?>

<div class="row">
    <div class="col-xs-12">
        <div class="box">
            <div class="box-header">
                <h3 class="box-title"><?= $this->title; ?></h3>
            </div>
            <div class="row">
                <div class="col-sm-10">
                </div>
                <?php if(empty($model)){?>
                    <div class="box-tools">
                        <?= Html::create(['insert-edit'], '添加商户银行卡', [
                            'data-toggle' => 'modal',
                            'data-target' => '#ajaxModal',
                        ])?>
                    </div>
                <?php }?>
            </div>
            <div class="box-body table-responsive">
                <table class="table table-hover">
                    <thead>
                    <tr>
                        <th>#</th>
                        <th>用户名</th>
                        <th>开户名</th>
                        <th>开户行</th>
                        <th>支行</th>
                        <th>银行卡号</th>
                        <th>开户省份</th>
                        <th>开户城市</th>
                        <th>用户类型</th>
                        <th>审核状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php if(!empty($model)){?>
                        <tr id= <?= $model->id; ?>>
                            <td>1</td>
                            <td>商户</td>
                            <td><?= $model->rale_name; ?></td>
                            <td><?= $model->bank_name; ?></td>
                            <td><?= $model->child_name; ?></td>
                            <td><?= $model->bank_code; ?></td>
                            <td><?= $model->province; ?></td>
                            <td><?= $model->city; ?></td>
                            <td>商户</td>
                            <td>通过审核</td>
                            <td>
                                <?= Html::edit(['update-edit'], '编辑', [
                                    'data-toggle' => 'modal',
                                    'data-target' => '#ajaxModal',
                                ])?>
                                <?= Html::delete(['delete', 'id' => $model->id]); ?>
                            </td>
                        </tr>
                    <?php }else{
                        echo "还未添加商户银行卡";
                    }?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>